﻿using Shop.Core.ERP;
using Shop.Core.Share;
using Shop.Model.Dto.Orders;
using Shop.Model.View.Order;

namespace Shop.IServices
{
    /// <summary>
    /// 订单服务
    /// </summary>
    public interface IOrdersAppService : IAppService
    {
        /// <summary>
        /// 创建订单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppResult<long>> Create(OrderAddDto input);

        /// <summary>
        /// 升级订单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppResult<long>> CreateGiftBagOrder(GiftBagOrderAddDto input);

        /// <summary>
        /// 列表查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        PageModel<OrderListVo> GetOrderList(PageSearchModel<int> input);

        /// <summary>
        /// 获取订单详情
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task<OrderDetailVo> GetOrderDetail(long orderId);

        /// <summary>
        /// 添加评论
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task AddComment(OrderEvaluateDto input);

        /// <summary>
        /// 收货
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task OrderConfirm(long input);

        /// <summary>
        /// 取消订单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CancelOrder(long input);

        /// <summary>
        /// 获取订单数（未支付、待发货、待收货）
        /// </summary>
        /// <returns></returns>
        Task<Dictionary<int,int>> GetOrderNum();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task Delivery(DeliveryNoticeData input);

        /// <summary>
        /// 物流追踪
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppResult<List<LogisticsTrackingVo>>> LogisticsTracking(long input);
    }
}
